import xadmin

from .models import *


class T_userAdmin(object):
    #显示列
    list_display =['id','username','name','password','sex','birthday','email']
    #指定搜索内容
    search_fields = ['id','username','name']
    #过滤器
    list_filter = ['id','username','name','time']


class T_pariseAdmin(object):
    #显示列
    list_display =['id','media_id','user_id','type','time']
    #指定搜索内容
    search_fields = ['id','media_id','user_id']
    #过滤器
    list_filter = ['id','media_id','user_id','time']


class T_starAdmin(object):
    #显示列
    list_display =['id','media_id','user_id','type','time']
    #指定搜索内容
    search_fields = ['id','media_id','user_id']
    #过滤器
    list_filter = ['id','media_id','user_id','time']


class T_commentAdmin(object):
    #显示列
    list_display =['id','media_id','type','user_id','username','content','time']
    #指定搜索内容
    search_fields = ['id','media_id','user_id']
    #过滤器
    list_filter = ['id','media_id','user_id','time']


class T_ratingAdmin(object):
    #显示列
    list_display =['id','media_id','user_id','type','time']
    #指定搜索内容
    search_fields = ['id','media_id','user_id']
    #过滤器
    list_filter = ['id','media_id','user_id','time']


class T_downloadAdmin(object):
    #显示列
    list_display =['id','picture_id','user_id','time']
    #指定搜索内容
    search_fields = ['id','picture_id','user_id']
    #过滤器
    list_filter = ['id','picture_id','user_id','time']


class T_recommentAdmin(object):
    #显示列
    list_display =['id','user_id','recommend_id']
    #指定搜索内容
    search_fields = ['id','recommend_id','user_id']
    #过滤器
    list_filter = ['id','recommend_id','user_id']


xadmin.site.register(T_user, T_userAdmin)
xadmin.site.register(T_parise, T_pariseAdmin)
xadmin.site.register(T_star, T_starAdmin)
xadmin.site.register(T_comment, T_commentAdmin)
xadmin.site.register(T_rating, T_ratingAdmin)
xadmin.site.register(T_download, T_downloadAdmin)
xadmin.site.register(T_recomment, T_recommentAdmin)
